In [1]:
import os

## Set directory
os.chdir('/hpc/group/pbenfeylab/CheWei/CW_data/genesys')

import networkx as nx
from genesys_evaluate_v1 import *
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import warnings
# Suppress all warning messages
warnings.filterwarnings("ignore", category=DeprecationWarning)
In [2]:
## Conda Env pytorch-gpu on DCC
print(torch.__version__)
print(sc.__version__) 
1.13.0.post200
1.9.1
In [3]:
## Genes considered/used (shared among samples) 
gene_list = pd.read_csv('./gene_list_1108.csv')

Load Data¶

In [4]:
with open("./genesys_root_data.pkl", 'rb') as file_handle:
    data = pickle.load(file_handle)
    
batch_size = 2000
dataset = Root_Dataset(data['X_test'], data['y_test'])
loader = DataLoader(dataset,
                         batch_size = batch_size,
                         shuffle = True, drop_last=True)
In [5]:
input_size = data['X_train'].shape[1]
## 10 cell types 
output_size = 10
embedding_dim = 256
hidden_dim = 256
n_layers = 2
device = "cpu"
path = "./"

Load trained GeneSys model¶

In [6]:
model = ClassifierLSTM(input_size, output_size, embedding_dim, hidden_dim, n_layers).to(device)
model.load_state_dict(torch.load(path+"best_ALL_1130_continue.pth", map_location=torch.device('cpu')))
model = model
model.eval()
Out[6]:
ClassifierLSTM(
  (fc1): Sequential(
    (0): Linear(in_features=17513, out_features=256, bias=True)
    (1): Dropout(p=0.2, inplace=False)
    (2): GaussianNoise()
  )
  (fc): Sequential(
    (0): ReLU()
    (1): Linear(in_features=512, out_features=512, bias=True)
    (2): ReLU()
    (3): Linear(in_features=512, out_features=10, bias=True)
  )
  (lstm): LSTM(256, 256, num_layers=2, batch_first=True, dropout=0.2, bidirectional=True)
  (dropout): Dropout(p=0.2, inplace=False)
  (b_to_z): DBlock(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=512, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (bz2_infer_z1): DBlock(
    (fc1): Linear(in_features=1024, out_features=256, bias=True)
    (fc2): Linear(in_features=1024, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (z1_to_z2): DBlock(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=512, out_features=256, bias=True)
    (fc_mu): Linear(in_features=256, out_features=512, bias=True)
    (fc_logsigma): Linear(in_features=256, out_features=512, bias=True)
  )
  (z_to_x): Decoder(
    (fc1): Linear(in_features=512, out_features=256, bias=True)
    (fc2): Linear(in_features=256, out_features=256, bias=True)
    (fc3): Linear(in_features=256, out_features=17513, bias=True)
  )
)
In [7]:
classes = ['Columella', 'Lateral Root Cap', 'Phloem', 'Xylem', 'Procambium', 'Pericycle', 'Endodermis', 'Cortex', 'Atrichoblast', 'Trichoblast']
class2num = {c: i for (i, c) in enumerate(classes)}
num2class = {i: c for (i, c) in enumerate(classes)}
In [8]:
cts = ['Atrichoblast','Trichoblast','Cortex','Endodermis','Pericycle','Procambium','Xylem','Phloem','Lateral Root Cap','Columella']
ctw = np.zeros((len(cts), 17513, 17513))
## number of cells sampled from the atlas
batch_size = 2000
In [9]:
## GRN for the transition t5 to t7
for ct in cts:
    print(ct)
    cws = np.zeros((len(loader), 17513, 17513))
    with torch.no_grad():
        for i, sample in enumerate(loader):
            x = sample['x'].to(device)
            y = sample['y'].to(device)
            y_label = [num2class[i] for i in y.tolist()]
            
            pred_h = model.init_hidden(batch_size)
            tfrom = model.generate_next(x, pred_h, 4).to('cpu').detach().numpy()
            cfrom = tfrom[np.where(np.array(y_label)==ct)[0],:]
            
            pred_h = model.init_hidden(batch_size)
            tto = model.generate_next(x, pred_h, 6).to('cpu').detach().numpy()   
            cto = tto[np.where(np.array(y_label)==ct)[0],:]
            
            cw = torch.linalg.lstsq(torch.tensor(cfrom), torch.tensor(cto)).solution.detach().numpy()
            cws[i] = cw
    
    ## Calculate mean across number of repeats
    cwm = np.mean(cws, axis=0)
    ctw[cts.index(ct)] = cwm
Atrichoblast
Trichoblast
Cortex
Endodermis
Pericycle
Procambium
Xylem
Phloem
Lateral Root Cap
Columella
In [10]:
# Save the array to disk
np.save('genesys_ctw_t5-t7.npy', ctw)
In [11]:
ctw = np.load('genesys_ctw_t5-t7.npy')
In [12]:
## Calculate z-scores
ctw_z = np.zeros((len(cts), 17513, 17513))
for i in range(len(cts)):
    ctw_z[i] = (ctw[i] - np.mean(ctw[i])) / np.std(ctw[i])
In [54]:
## Filtering based on z-scores (with no weights)
ctw_f = np.zeros((len(cts), 17513, 17513))
## z-score threshold (keep values > mean + threshold*std)
threshold=3
for i in range(len(cts)):
    ctw_f[i] = np.abs(ctw_z[i]) > threshold

Load TFs list¶

In [55]:
wanted_TFs = pd.read_csv("./Kay_TF_thalemine_annotations.csv")
In [56]:
## Make TF names unique and assign preferred names
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G33880"]="WOX9"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G45160"]="SCL27"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G04410"]="NAC78"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G29035"]="ORS1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02540"]="ZHD3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G16500"]="IAA26"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G09740"]="HAG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G24660"]="ZHD2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G46880"]="HDG5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G28420"]="RLT1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G14580"]="BLJ"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G45260"]="BIB"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G02070"]="RVN"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G28160"]="FIT"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G68360"]="GIS3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G20640"]="NLP4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G05550"]="VFP5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G59470"]="FRF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G15150"]="HAT7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G14750"]="WER"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G75710"]="BRON"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G74500"]="TMO7"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT2G12646"]="RITF1"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT3G48100"]="ARR5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G16141"]="GATA17L"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G65640"]="NFL"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G62700"]="VND5"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT4G36160"]="VND2"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G66300"]="VND3"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT1G12260"]="VND4"
wanted_TFs['Name'][wanted_TFs['GeneID']=="AT5G62380"]="VND6"
In [57]:
pd.Series(wanted_TFs['Name']).value_counts().head(5)
Out[57]:
NAC001    1
PRE5      1
MYB118    1
MYB21     1
MYB0      1
Name: Name, dtype: int64

Network analysis¶

In [58]:
TFidx = []
for i in wanted_TFs['GeneID']:
    if i in gene_list['features'].tolist():
        TFidx.append(np.where(gene_list['features']==i)[0][0])

TFidx = np.sort(np.array(TFidx))
In [59]:
def network(i):
    ## No weights
    adj_nw = ctw_f[i]
    ## Weighted
    adj = ctw[i]*ctw_f[i]
    ## TF only
    adj = adj[np.ix_(TFidx,TFidx)]
    adj_nw = adj_nw[np.ix_(TFidx,TFidx)]
    
    ## Remove no connect 
    regidx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[0]).value_counts().index[pd.Series(np.where(adj_nw==True)[0]).value_counts()>=1]))
    taridx = np.sort(np.array(pd.Series(np.where(adj_nw==True)[1]).value_counts().index[pd.Series(np.where(adj_nw==True)[1]).value_counts()>=1]))
    ## Reciprocol
    keepidx = np.sort(np.array(list(set(regidx).intersection(taridx))))
    #keepidx = np.sort(np.array(list(set(regidx).union(taridx))))
    
    TFID = np.array(gene_list['features'][TFidx])[keepidx].tolist()
    ## TF name to keep
    TFname = []
    for i in np.array(gene_list['features'][TFidx])[keepidx]:
        TFname.append(wanted_TFs['Name'][np.where(wanted_TFs['GeneID']==i)[0][0]])
        
    adj = adj[np.ix_(keepidx,keepidx)]
    
    # Create a NetworkX graph for non-directed edges
    G = nx.Graph()  # supports directed edges and allows for multiple edges between the same pair of nodes
    
    # Add nodes to the graph
    num_nodes = adj.shape[0]
    for i, name in enumerate(TFname):
        G.add_node(i, name=name)
    
    # Add edges to the graph with weights
    for i in range(num_nodes):
        for j in range(num_nodes):
            weight = adj[i, j]
            if weight != 0:
                G.add_edge(i, j, weight=abs(weight), distance=1/abs(weight))
            

    ## Measures the extent to which how close a node is to all other nodes in the network, considering the shortest paths or geodesic distances between nodes
    closeness_centrality = nx.closeness_centrality(G, distance='distance')
    ## Measures the extent to which a node that are not only well-connected but also connected to other well-connected nodes.
    eigenvector_centrality = nx.eigenvector_centrality(G)
    
    # Create a NetworkX graph for diected edges
    G = nx.MultiDiGraph()  # supports directed edges and allows for multiple edges between the same pair of nodes
    
    # Add nodes to the graph
    num_nodes = adj.shape[0]
    for i, name in enumerate(TFname):
        G.add_node(i, name=name)
    
    # Add edges to the graph with weights
    for i in range(num_nodes):
        for j in range(num_nodes):
            weight = adj[i, j]
            if weight != 0:
                G.add_edge(i, j, weight=weight)
    
    ## Measures the number of connections (edges) each node has
    degree_centrality = nx.degree_centrality(G)
    # Calculate outgoing centrality
    out_centrality = nx.out_degree_centrality(G)
    # Calculate incoming centrality
    in_centrality = nx.in_degree_centrality(G)
    ## Measures the extent to which a node lies on the shortest paths between other nodes.
    betweenness_centrality = nx.betweenness_centrality(G, weight='weight')
    
    ## Non_Reciprocal Out centrality
    # Visualize the graph
    pos = nx.spring_layout(G)  # Positions of the nodes
    
    # Node colors based on weighted betweenness centrality
    node_colors = [out_centrality[node] for node in G.nodes()]
    
    # Node sizes based on weighted betweenness centrality
    node_sizes = [out_centrality[node] * 1000 for node in G.nodes()]

    # Get the edge weights as a dictionary
    edge_weights = nx.get_edge_attributes(G, 'weight')
    edge_colors = ['red' if weight > 0 else 'blue' for (_, _, weight) in G.edges(data='weight')]
    
    # Scale the edge weights to desired linewidths
    max_weight = max(edge_weights.values())
    edge_widths = [float(edge_weights[edge]) / max_weight for edge in G.edges]
    
    # Draw the graph
    nx.draw(G, pos=pos, node_color=node_colors, node_size=node_sizes, with_labels=False, width=edge_widths, edge_color=edge_colors)
    # Add node labels
    labels = {node: G.nodes[node]['name'] for node in G.nodes}
    nx.draw_networkx_labels(G, pos=pos, labels=labels, font_size=8)
    
    # Add a colorbar to show the weighted betweenness centrality color mapping
    sm = plt.cm.ScalarMappable(cmap='viridis', norm=plt.Normalize(vmin=min(node_colors), vmax=max(node_colors)))
    sm.set_array([])
    plt.colorbar(sm)
    
    # Show the plot
    plt.show()
    
    dc = pd.DataFrame.from_dict(degree_centrality, orient='index', columns=['degree_centrality'])
    oc = pd.DataFrame.from_dict(out_centrality, orient='index', columns=['out_centrality'])
    ic = pd.DataFrame.from_dict(in_centrality, orient='index', columns=['in_centrality'])
    bc = pd.DataFrame.from_dict(betweenness_centrality, orient='index', columns=['betweenness_centrality'])
    cc = pd.DataFrame.from_dict(closeness_centrality, orient='index', columns=['closeness_centrality'])
    ec = pd.DataFrame.from_dict(eigenvector_centrality, orient='index', columns=['eigenvector_centrality'])
    df = pd.concat([dc,oc,ic,bc,cc,ec], axis=1)
    df.index =TFname
    df = df.sort_values('betweenness_centrality', ascending=False)
    
    return(df)
In [60]:
atri = network(0)
In [61]:
tri = network(1)
In [62]:
cor = network(2)
In [63]:
end = network(3)
In [64]:
per = network(4)
In [65]:
pro = network(5)
In [66]:
xyl = network(6)
In [67]:
phl = network(7)
In [68]:
lrc = network(8)
In [69]:
col = network(9)
In [70]:
atri.columns = ['atri_degree_centrality','atri_out_centrality','atri_in_centrality','atri_betweenness_centrality','atri_closeness_centrality','atri_eigenvector_centrality']
tri.columns = ['tri_degree_centrality','tri_out_centrality','tri_in_centrality','tri_betweenness_centrality','tri_closeness_centrality','tri_eigenvector_centrality']
cor.columns = ['cor_degree_centrality','cor_out_centrality','cor_in_centrality','cor_betweenness_centrality','cor_closeness_centrality','cor_eigenvector_centrality']
end.columns = ['end_degree_centrality','end_out_centrality','end_in_centrality','end_betweenness_centrality','end_closeness_centrality','end_eigenvector_centrality']
per.columns = ['per_degree_centrality','per_out_centrality','per_in_centrality','per_betweenness_centrality','per_closeness_centrality','per_eigenvector_centrality']
pro.columns = ['pro_degree_centrality','pro_out_centrality','pro_in_centrality','pro_betweenness_centrality','pro_closeness_centrality','pro_eigenvector_centrality']
xyl.columns = ['xyl_degree_centrality','xyl_out_centrality','xyl_in_centrality','xyl_betweenness_centrality','xyl_closeness_centrality','xyl_eigenvector_centrality']
phl.columns = ['phl_degree_centrality','phl_out_centrality','phl_in_centrality','phl_betweenness_centrality','phl_closeness_centrality','phl_eigenvector_centrality']
lrc.columns = ['lrc_degree_centrality','lrc_out_centrality','lrc_in_centrality','lrc_betweenness_centrality','lrc_closeness_centrality','lrc_eigenvector_centrality']
col.columns = ['col_degree_centrality','col_out_centrality','col_in_centrality','col_betweenness_centrality','col_closeness_centrality','col_eigenvector_centrality']
In [71]:
## Indentify main regulators in each net work
tff = []
tff = tff + atri[atri['atri_betweenness_centrality']>0].index.tolist()
tff = tff + tri[tri['tri_betweenness_centrality']>0].index.tolist()
tff = tff + lrc[lrc['lrc_betweenness_centrality']>0].index.tolist()
tff = tff + cor[cor['cor_betweenness_centrality']>0].index.tolist()
tff = tff + end[end['end_betweenness_centrality']>0].index.tolist()
tff = tff + per[per['per_betweenness_centrality']>0].index.tolist()
tff = tff + pro[pro['pro_betweenness_centrality']>0].index.tolist()
tff = tff + xyl[xyl['xyl_betweenness_centrality']>0].index.tolist()
tff = tff + phl[phl['phl_betweenness_centrality']>0].index.tolist()
tff = tff + col[col['col_betweenness_centrality']>0].index.tolist()
tf_occurance = pd.DataFrame(pd.Series(tff).value_counts(), columns=['tf_occurance'])
tf_spec = pd.concat([tf_occurance, atri, tri, lrc, cor, end, per, pro, xyl, phl, col], axis=1)
tf_spec = tf_spec.fillna(0)
In [72]:
## Epidermis (atri, tri, lrc)
celltype1='atri'
celltype2='tri'
celltype3='lrc'
ts = tf_spec[tf_spec['tf_occurance']==3][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==9].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[72]:
atri_betweenness_centrality tri_betweenness_centrality lrc_betweenness_centrality atri_out_centrality tri_out_centrality lrc_out_centrality atri_in_centrality tri_in_centrality lrc_in_centrality centrality_count centrality_sum
MYB23 0.712060 0.247739 0.708787 0.106494 0.187037 0.088929 0.212987 0.020370 0.098004 9 11.382408
IAA14 0.366728 0.001172 0.014988 0.298701 0.203704 0.041742 0.072727 0.033333 0.052632 9 10.085726
FIT 0.280459 0.000027 0.000168 0.101299 0.101852 0.030853 0.096104 0.009259 0.065336 9 9.685357
In [73]:
## atri, tri
celltype1='atri'
celltype2='tri'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[73]:
atri_betweenness_centrality tri_betweenness_centrality atri_out_centrality tri_out_centrality atri_in_centrality tri_in_centrality centrality_count centrality_sum
LRL3 0.811046 0.987913 0.064935 0.872222 0.376623 0.890741 6 10.003480
RHD6 0.415104 0.889957 0.194805 0.131481 0.148052 0.535185 6 8.314585
AT4G09100 0.011939 0.910599 0.046753 0.566667 0.031169 0.444444 6 8.011571
WRKY45 0.698052 0.009263 0.254545 0.066667 0.711688 0.135185 6 7.875400
TTG2 0.673147 0.246722 0.389610 0.124074 0.233766 0.005556 6 7.672875
NAC6 0.104573 0.304944 0.122078 0.031481 0.664935 0.050000 6 7.278011
WRKY61 0.089949 0.413423 0.124675 0.029630 0.262338 0.314815 6 7.234829
MYB50 0.808489 0.003704 0.028571 0.007407 0.124675 0.075926 6 7.048773
RSL4 0.000588 0.523325 0.054545 0.116667 0.002597 0.322222 6 7.019945
AT5G06800 0.558239 0.024071 0.054545 0.053704 0.088312 0.207407 6 6.986278
WRKY70 0.012311 0.455277 0.036364 0.040741 0.098701 0.203704 6 6.847097
HRS1 0.019196 0.023810 0.116883 0.057407 0.153247 0.120370 6 6.490914
AT5G22890 0.002848 0.001852 0.075325 0.009259 0.161039 0.044444 6 6.294767
NAC003 0.000027 0.024500 0.018182 0.029630 0.098701 0.074074 6 6.245114
LSD1 0.000007 0.000258 0.057143 0.031481 0.023377 0.062963 6 6.175228
In [74]:
## Atrichoblast specific
celltype = 'atri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[74]:
atri_betweenness_centrality atri_out_centrality atri_in_centrality centrality_count centrality_sum
AT3G05860 0.792478 0.212987 0.145455 3 4.150920
HB30 0.681669 0.067532 0.015584 3 3.764786
GL2 0.527029 0.111688 0.064935 3 3.703653
AT2G28710 0.187324 0.207792 0.612987 3 4.008103
OFP18 0.178490 0.070130 0.153247 3 3.401867
MC2 0.097849 0.020779 0.054545 3 3.173174
HB24 0.014847 0.083117 0.264935 3 3.362899
HB17 0.013217 0.025974 0.233766 3 3.272957
BZO2H3 0.002584 0.028571 0.046753 3 3.077909
TRY 0.002435 0.181818 0.007792 3 3.192045
RMR1 0.002124 0.005195 0.072727 3 3.080046
MEA 0.002124 0.018182 0.114286 3 3.134591
AT4G31650 0.000846 0.189610 0.005195 3 3.195651
WRKY3 0.000216 0.036364 0.044156 3 3.080736
MBD1 0.000189 0.010390 0.051948 3 3.062527
WRKY47 0.000027 0.041558 0.119481 3 3.161066
In [75]:
## Trichoblast specific
celltype = 'tri'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[75]:
tri_betweenness_centrality tri_out_centrality tri_in_centrality centrality_count centrality_sum
RSL2 0.981282 0.177778 0.548148 3 4.707208
RAP2.11 0.941892 0.094444 0.148148 3 4.184484
AT5G56200 0.852206 0.118519 0.131481 3 4.102206
AT3G53370 0.825617 0.296296 0.287037 3 4.408950
AT4G39160 0.719913 0.187037 0.146296 3 4.053247
AT5G44260 0.567051 0.124074 0.038889 3 3.730014
RL6 0.288875 0.300000 0.025926 3 3.614801
ATMYC1 0.231176 0.096296 0.042593 3 3.370065
KDR 0.137116 0.588889 0.022222 3 3.748227
GL3 0.125898 0.090741 0.050000 3 3.266639
GATA12 0.047083 0.066667 0.038889 3 3.152639
AT2G37120 0.007023 0.022222 0.100000 3 3.129245
AT5G04390 0.003408 0.159259 0.051852 3 3.214519
AT2G20030 0.001845 0.020370 0.059259 3 3.081475
AT2G19380 0.001800 0.003704 0.011111 3 3.016615
ABF4 0.000649 0.029630 0.044444 3 3.074723
OFP13 0.000601 0.237037 0.053704 3 3.291342
AT2G05160 0.000034 0.040741 0.118519 3 3.159294
NF-YC10 0.000027 0.035185 0.046296 3 3.081509
In [76]:
## LRC specific
celltype = 'lrc'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[76]:
lrc_betweenness_centrality lrc_out_centrality lrc_in_centrality centrality_count centrality_sum
PLT1 0.873767 0.607985 0.145191 3 4.626943
AT1G76580 0.871902 0.112523 0.386570 3 4.370995
OFP6 0.846870 0.067151 0.250454 3 4.164475
BNQ3 0.575700 0.049002 0.103448 3 3.728150
PIF3 0.465646 0.059891 0.063521 3 3.589058
WER 0.460634 0.110708 0.074410 3 3.645752
AT5G62610 0.439624 0.186933 0.045372 3 3.671929
AIL5 0.433932 0.050817 0.108893 3 3.593641
ERF9 0.424425 0.136116 0.065336 3 3.625877
STOP1 0.368372 0.161525 0.045372 3 3.575268
NAC094 0.309150 0.562613 0.027223 3 3.898987
IAA1 0.247491 0.030853 0.163339 3 3.441683
WRKY35 0.124567 0.056261 0.079855 3 3.260683
AT1G49475 0.079366 0.134301 0.027223 3 3.240891
TLP6 0.065917 0.125227 0.034483 3 3.225626
GRF2 0.058574 0.052632 0.059891 3 3.171097
LBD4 0.016657 0.049002 0.029038 3 3.094697
TTG1 0.006550 0.085299 0.016334 3 3.108183
HMGB4 0.005544 0.147005 0.036298 3 3.188847
CHR38 0.001168 0.154265 0.016334 3 3.171767
RBR1 0.000591 0.065336 0.078040 3 3.143966
GATA4 0.000221 0.148820 0.043557 3 3.192599
RITF1 0.000158 0.188748 0.018149 3 3.207055
AT2G46160 0.000079 0.121597 0.021779 3 3.143455
FEZ 0.000049 0.491833 0.005445 3 3.497327
IAA33 0.000016 0.330309 0.007260 3 3.337585
AT3G60670 0.000007 0.139746 0.016334 3 3.156086
In [77]:
## Columella specific
celltype = 'col'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[77]:
col_betweenness_centrality col_out_centrality col_in_centrality centrality_count centrality_sum
WRKY26 0.752247 0.183284 0.158358 3 4.093889
SNI1 0.622039 0.041056 0.092375 3 3.755470
AT2G41835 0.330515 0.057185 0.325513 3 3.713213
GATA5 0.213643 0.027859 0.026393 3 3.267896
CRF8 0.195680 0.043988 0.174487 3 3.414155
IAA10 0.123137 0.055718 0.020528 3 3.199383
NAC052 0.077782 0.070381 0.243402 3 3.391565
SPL14 0.011595 0.190616 0.079179 3 3.281389
RR1 0.010658 0.205279 0.098240 3 3.314177
ARF6 0.005816 0.105572 0.065982 3 3.177370
WRKY72 0.005217 0.045455 0.020528 3 3.071199
NAC050 0.003587 0.058651 0.076246 3 3.138484
HSL1 0.003139 0.071848 0.118768 3 3.193755
PRR7 0.001466 0.008798 0.079179 3 3.089443
CHR11 0.001466 0.057185 0.126100 3 3.184751
TLP3 0.001466 0.024927 0.021994 3 3.048387
EIL3 0.001466 0.002933 0.085044 3 3.089443
BBX28 0.001221 0.019062 0.027859 3 3.048142
AT5G65910 0.000693 0.063050 0.068915 3 3.132658
NLP7 0.000347 0.085044 0.131965 3 3.217355
SNL2 0.000065 0.140762 0.023460 3 3.164287
AT1G74250 0.000052 0.048387 0.076246 3 3.124685
AT4G22360 0.000032 0.051320 0.051320 3 3.102672
SYD 0.000011 0.087977 0.105572 3 3.193559
CHR17 0.000006 0.051320 0.038123 3 3.089449
In [78]:
## Ground tissue
celltype1='cor'
celltype2='end'
ts = tf_spec[tf_spec['tf_occurance']==2][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==6].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[78]:
cor_betweenness_centrality end_betweenness_centrality cor_out_centrality end_out_centrality cor_in_centrality end_in_centrality centrality_count centrality_sum
AT1G05710 0.344936 1.954665e-02 0.380319 0.409569 0.840426 0.292823 6 8.287620
JKD 0.005986 4.758107e-03 0.582447 0.205742 0.351064 0.219139 6 7.369135
AT1G72210 0.035170 1.466571e-05 0.462766 0.049761 0.617021 0.044976 6 7.209709
HB5 0.012901 1.503236e-03 0.319149 0.112919 0.468085 0.206699 6 7.121255
AT3G61420 0.003106 8.377789e-04 0.236702 0.068900 0.617021 0.147368 6 7.073936
LAF1 0.007064 3.473941e-04 0.236702 0.073684 0.569149 0.119617 6 7.006564
SCL3 0.000433 6.987296e-03 0.196809 0.300478 0.055851 0.371292 6 6.931850
AT3G24120 0.001028 1.848796e-03 0.207447 0.079426 0.353723 0.191388 6 6.834861
MYB122 0.002057 3.608682e-03 0.077128 0.295694 0.164894 0.227751 6 6.771132
LRP1 0.002199 1.209921e-04 0.236702 0.023923 0.398936 0.031579 6 6.693460
AT1G64380 0.001986 1.264918e-04 0.207447 0.041148 0.335106 0.058373 6 6.644187
AT4G36860 0.000014 5.802123e-04 0.103723 0.119617 0.146277 0.140670 6 6.510881
COL4 0.000326 9.166071e-07 0.130319 0.050718 0.255319 0.073684 6 6.510367
WRKY69 0.000716 5.499643e-06 0.135638 0.014354 0.281915 0.019139 6 6.451768
AT4G00940 0.011638 1.905626e-03 0.015957 0.234450 0.021277 0.129187 6 6.414414
bZIP58 0.021035 5.195329e-03 0.015957 0.230622 0.018617 0.116746 6 6.408174
HB16 0.000177 4.308053e-05 0.156915 0.035407 0.159574 0.038278 6 6.390394
MYB14 0.000014 1.484903e-04 0.138298 0.015311 0.079787 0.015311 6 6.248870
AT3G61180 0.000043 2.658161e-05 0.015957 0.035407 0.143617 0.039234 6 6.234285
GATA16 0.000007 9.166071e-07 0.167553 0.019139 0.037234 0.002871 6 6.226805
AP2 0.000021 1.741553e-04 0.087766 0.024880 0.053191 0.025837 6 6.191871
NGA3 0.000170 2.548168e-04 0.053191 0.040191 0.005319 0.088038 6 6.187165
ABF2 0.000667 9.166071e-07 0.039894 0.055502 0.029255 0.059330 6 6.184649
AT2G27580 0.000752 2.749821e-06 0.077128 0.032536 0.042553 0.027751 6 6.180722
LZF1 0.000014 9.166071e-07 0.085106 0.013397 0.063830 0.009569 6 6.171918
RLT2 0.042780 4.949678e-05 0.023936 0.021053 0.050532 0.023923 6 6.162274
AT1G21580 0.000759 9.166071e-07 0.058511 0.019139 0.066489 0.012440 6 6.157339
AT4G16150 0.001525 5.499643e-06 0.034574 0.036364 0.045213 0.030622 6 6.148303
ABF3 0.002312 1.173257e-04 0.061170 0.022010 0.031915 0.028708 6 6.146232
ERF3 0.000674 2.749821e-06 0.047872 0.031579 0.029255 0.033493 6 6.142876
AT1G68070 0.000007 6.416250e-06 0.018617 0.015311 0.087766 0.018182 6 6.139889
BZIP60 0.001716 1.833214e-06 0.042553 0.020096 0.034574 0.020096 6 6.119037
ARF2 0.004135 3.666428e-06 0.023936 0.031579 0.026596 0.025837 6 6.112087
bHLH104 0.001610 1.374911e-05 0.021277 0.028708 0.015957 0.043062 6 6.110628
ALY3 0.000014 1.191589e-05 0.026596 0.031579 0.015957 0.030622 6 6.104780
MYC3 0.001099 3.941410e-05 0.039894 0.020096 0.018617 0.020096 6 6.099841
TOC1 0.000014 1.338246e-04 0.015957 0.013397 0.053191 0.009569 6 6.092263
WRKY4 0.000021 6.232928e-05 0.045213 0.020096 0.005319 0.018182 6 6.088893
TGA3 0.000057 3.941410e-05 0.018617 0.010526 0.053191 0.004785 6 6.087216
ZAP1 0.000007 3.666428e-06 0.007979 0.021053 0.005319 0.025837 6 6.060199
PHR1 0.000014 5.224660e-05 0.013298 0.019139 0.005319 0.019139 6 6.056961
In [79]:
## Cortex specific
celltype = 'cor'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[79]:
cor_betweenness_centrality cor_out_centrality cor_in_centrality centrality_count centrality_sum
AT2G38300 0.005340 0.231383 0.468085 3 3.704809
TMO7 0.004028 0.143617 0.007979 3 3.155624
IDD4 0.003142 0.244681 0.348404 3 3.596227
AT3G52250 0.003121 0.058511 0.029255 3 3.090887
RGL3 0.001404 0.140957 0.409574 3 3.551936
AT2G42660 0.000957 0.125000 0.276596 3 3.402553
AT1G63170 0.000759 0.007979 0.069149 3 3.077887
EMB1135 0.000525 0.018617 0.007979 3 3.027121
ETR2 0.000454 0.010638 0.151596 3 3.162688
BZIP28 0.000348 0.015957 0.029255 3 3.045560
SDG2 0.000348 0.037234 0.029255 3 3.066837
OFP12 0.000291 0.101064 0.005319 3 3.106674
NPH4 0.000177 0.013298 0.037234 3 3.050709
ETR1 0.000085 0.002660 0.069149 3 3.071894
APRR2 0.000078 0.047872 0.015957 3 3.063908
NF-YC4 0.000028 0.007979 0.002660 3 3.010667
ZFN1 0.000021 0.119681 0.146277 3 3.265979
HMG 0.000014 0.034574 0.058511 3 3.093099
IDD7 0.000007 0.013298 0.132979 3 3.146284
AT2G37650 0.000007 0.010638 0.013298 3 3.023943
GBF3 0.000007 0.005319 0.021277 3 3.026603
GLK2 0.000007 0.013298 0.242021 3 3.255326
AT5G12850 0.000007 0.010638 0.005319 3 3.015965
EIL1 0.000007 0.013298 0.151596 3 3.164901
In [80]:
## Endodermis specific
celltype = 'end'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[80]:
end_betweenness_centrality end_out_centrality end_in_centrality centrality_count centrality_sum
AT5G26749 3.517571e-02 0.005742 0.006699 3 3.047616
ARF11 2.604081e-02 0.006699 0.006699 3 3.039438
bZIP52 5.851620e-03 0.011483 0.001914 3 3.019249
BIB 3.087133e-03 0.120574 0.093780 3 3.217441
HK2 2.508754e-03 0.006699 0.014354 3 3.023561
... ... ... ... ... ...
IWS1 9.166071e-07 0.020096 0.018182 3 3.038278
BZIP17 9.166071e-07 0.020096 0.023923 3 3.044020
ULT2 9.166071e-07 0.044019 0.049761 3 3.093781
AT2G43140 9.166071e-07 0.021053 0.002871 3 3.023924
AT1G77570 9.166071e-07 0.002871 0.002871 3 3.005743

153 rows × 5 columns

In [81]:
## Stele
celltype1='per'
celltype2='pro'
celltype3='xyl'
celltype4='phl'
ts = tf_spec[tf_spec['tf_occurance']==4][[celltype1+'_betweenness_centrality', celltype2+'_betweenness_centrality', celltype3+'_betweenness_centrality', celltype4+'_betweenness_centrality', celltype1+'_out_centrality', celltype2+'_out_centrality', celltype3+'_out_centrality', celltype4+'_out_centrality', celltype1+'_in_centrality', celltype2+'_in_centrality', celltype3+'_in_centrality', celltype4+'_in_centrality']]
tso = (ts > 0)
ts['centrality_count'] = tso.sum(axis=1)
ts['centrality_sum'] = ts.sum(axis=1)
ts[ts['centrality_count']==12].sort_values(['centrality_count','centrality_sum'], ascending=False)
Out[81]:
per_betweenness_centrality pro_betweenness_centrality xyl_betweenness_centrality phl_betweenness_centrality per_out_centrality pro_out_centrality xyl_out_centrality phl_out_centrality per_in_centrality pro_in_centrality xyl_in_centrality phl_in_centrality centrality_count centrality_sum
HB-8 0.205159 0.691760 0.831924 0.242107 0.148418 0.290634 0.473373 0.046103 0.047445 0.651515 0.313609 0.003293 12 15.945342
RMA2 0.105318 0.365084 0.007995 0.018278 0.047445 0.079890 0.153846 0.086718 0.115572 0.092287 0.242604 0.172338 12 13.487375
IAA9 0.000025 0.010400 0.008030 0.000051 0.098540 0.100551 0.591716 0.088913 0.024331 0.243802 0.171598 0.090011 12 13.427968
In [82]:
## Pericycle
celltype = 'per'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[82]:
per_betweenness_centrality per_out_centrality per_in_centrality centrality_count centrality_sum
GATA23 0.488183 0.077859 0.029197 3 3.595239
MGP 0.310674 0.049878 0.023114 3 3.383667
NUC 0.190926 0.093674 0.086375 3 3.370975
AT4G20970 0.134921 0.072993 0.009732 3 3.217646
TRFL10 0.077980 0.015815 0.019465 3 3.113260
IDD11 0.057133 0.131387 0.055961 3 3.244481
AT3G21330 0.020286 0.010949 0.002433 3 3.033668
AT1G27050 0.012056 0.004866 0.006083 3 3.023005
AT1G61730 0.007738 0.013382 0.024331 3 3.045451
EIN4 0.007403 0.007299 0.003650 3 3.018352
NAC089 0.002575 0.009732 0.021898 3 3.034206
SOG1 0.001292 0.130170 0.109489 3 3.240951
AT2G20100 0.001215 0.024331 0.065693 3 3.091239
OFP7 0.001211 0.020681 0.014599 3 3.036490
NAGS2 0.001211 0.003650 0.009732 3 3.014593
NAC027 0.000316 0.001217 0.003650 3 3.005182
AT2G38950 0.000068 0.008516 0.008516 3 3.017100
LUH 0.000041 0.037713 0.007299 3 3.045054
GAMMA-H2AX 0.000034 0.008516 0.021898 3 3.030448
MYB13 0.000018 0.003650 0.006083 3 3.009750
In [83]:
## Procambium
celltype = 'pro'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[83]:
pro_betweenness_centrality pro_out_centrality pro_in_centrality centrality_count centrality_sum
AT1G75490 0.442029 0.206612 0.183196 3 3.831836
SHY2 0.429784 0.055096 0.217631 3 3.702512
CRF6 0.378921 0.172176 0.144628 3 3.695725
HAT3 0.371357 0.157025 0.130854 3 3.659236
MYB61 0.370394 0.033058 0.191460 3 3.594912
REV 0.337268 0.059229 0.303030 3 3.699527
AT1G01640 0.294749 0.028926 0.088154 3 3.411829
AT2G38090 0.173740 0.117080 0.037190 3 3.328010
HSFB4 0.089900 0.159780 0.041322 3 3.291002
RGL1 0.052281 0.095041 0.078512 3 3.225835
NAC080 0.042983 0.238292 0.152893 3 3.434167
SOL1 0.029427 0.104683 0.024793 3 3.158904
AT1G11950 0.025409 0.035813 0.019284 3 3.080505
AT3G20640 0.011494 0.108815 0.096419 3 3.216728
HB18 0.004337 0.078512 0.093664 3 3.176514
AT4G17780 0.002949 0.056474 0.041322 3 3.100745
AT2G40200 0.002301 0.151515 0.190083 3 3.343899
AT1G69570 0.002191 0.013774 0.057851 3 3.073816
SPL2 0.001712 0.023416 0.086777 3 3.111905
AT3G04850 0.001389 0.009642 0.037190 3 3.048221
SIGC 0.001374 0.011019 0.033058 3 3.045451
OBP4 0.001252 0.100551 0.126722 3 3.228525
VAL3 0.000490 0.042700 0.024793 3 3.067983
AIF1 0.000427 0.075758 0.092287 3 3.168472
AT4G25410 0.000046 0.061983 0.114325 3 3.176354
GAI 0.000013 0.070248 0.117080 3 3.187341
In [84]:
## Xylem
celltype = 'xyl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[84]:
xyl_betweenness_centrality xyl_out_centrality xyl_in_centrality centrality_count centrality_sum
LBD31 0.950655 0.183432 0.627219 3 4.761306
MYB46 0.914272 0.242604 0.857988 3 5.014863
IAA6 0.908918 0.550296 0.473373 3 4.932587
VND4 0.881445 0.136095 0.810651 3 4.828191
VND2 0.870245 0.307692 0.769231 3 4.947168
MYB85 0.830516 0.171598 0.455621 3 4.457735
VND7 0.761764 0.165680 0.822485 3 4.749930
AT1G66810 0.748556 0.532544 0.674556 3 4.955657
ZHD3 0.714427 0.147929 0.769231 3 4.631586
AT1G68200 0.695865 0.562130 0.349112 3 4.607108
MYB83 0.688574 0.526627 0.763314 3 4.978515
VND3 0.647154 0.337278 0.639053 3 4.623485
VND5 0.588405 0.106509 0.792899 3 4.487813
HB31 0.524549 0.609467 0.266272 3 4.400289
AT1G68810 0.519125 0.668639 0.786982 3 4.974746
XND1 0.457523 0.289941 0.289941 3 4.037405
AT3G10470 0.400042 0.023669 0.307692 3 3.731403
ASL9 0.382995 0.242604 0.266272 3 3.891871
MYB52 0.325866 0.195266 0.644970 3 4.166103
MYB99 0.323542 0.366864 0.177515 3 3.867921
VND6 0.232988 0.502959 0.301775 3 4.037722
VND1 0.200232 0.420118 0.313609 3 3.933960
LBD18 0.069174 0.426036 0.804734 3 4.299944
AT3G49930 0.040469 0.029586 0.035503 3 3.105558
BRH1 0.013384 0.272189 0.065089 3 3.350662
AT1G21780 0.013314 0.112426 0.213018 3 3.338757
BBX31 0.011764 0.165680 0.147929 3 3.325373
BZIP49 0.005847 0.177515 0.059172 3 3.242533
AP3 0.002818 0.224852 0.053254 3 3.280924
NAC060 0.000141 0.147929 0.165680 3 3.313750
HAT14 0.000070 0.242604 0.035503 3 3.278177
In [85]:
## Phloem
celltype = 'phl'
cs = tf_spec[tf_spec['tf_occurance']==1][[celltype+'_betweenness_centrality', celltype+'_out_centrality',celltype+'_in_centrality']]
cso = (cs > 0)
cs['centrality_count'] = cso.sum(axis=1)
cs['centrality_sum'] = cs.sum(axis=1)
cs[cs['centrality_count']==3].sort_values(['centrality_count',celltype+'_betweenness_centrality'], ascending=False)
Out[85]:
phl_betweenness_centrality phl_out_centrality phl_in_centrality centrality_count centrality_sum
AT5G41380 0.740752 0.257958 0.469813 3 4.468524
HCA2 0.644129 0.398463 0.276619 3 4.319211
ETC1 0.088684 0.002195 0.001098 3 3.091977
AT3G12730 0.043852 0.717892 0.815587 3 4.577332
bZIP4 0.036661 0.009879 0.003293 3 3.049833
WOX2 0.014629 0.005488 0.015368 3 3.035486
ET2 0.006317 0.018661 0.034029 3 3.059007
bZIP23 0.004318 0.018661 0.014270 3 3.037249
IDD16 0.003993 0.031833 0.035126 3 3.070952
AGL15 0.002192 0.094402 0.085620 3 3.182214
GT-1 0.001111 0.035126 0.026345 3 3.062582
AT5G09460 0.000678 0.035126 0.025247 3 3.061051
MBD10 0.000572 0.024149 0.018661 3 3.043382
FLP 0.000439 0.095499 0.060373 3 3.156312
JAZ12 0.000423 0.035126 0.032931 3 3.068480
AT-HSFA5 0.000224 0.016465 0.010977 3 3.027667
NF-YB8 0.000221 0.023052 0.030735 3 3.054008
GATA19 0.000217 0.005488 0.004391 3 3.010096
NAC086 0.000166 0.055982 0.059276 3 3.115424
AT1G21000 0.000142 0.007684 0.016465 3 3.024292
AT4G00270 0.000055 0.031833 0.023052 3 3.054940
SNL5 0.000054 0.005488 0.003293 3 3.008836
BPEp 0.000045 0.021954 0.024149 3 3.046148
CIP8 0.000022 0.018661 0.012075 3 3.030757
BHLH101 0.000022 0.021954 0.047201 3 3.069176
MAC5A 0.000019 0.012075 0.010977 3 3.023071
SVP 0.000016 0.110867 0.111965 3 3.222848
GATA20 0.000013 0.104281 0.094402 3 3.198696
PKL 0.000013 0.037322 0.035126 3 3.072461
AT1G55750 0.000013 0.008782 0.005488 3 3.014283
MBF1A 0.000010 0.037322 0.036224 3 3.073555
KNAT2 0.000008 0.069155 0.057080 3 3.126243
NF-YC3 0.000006 0.076839 0.088913 3 3.165758
BPC3 0.000006 0.029638 0.020856 3 3.050500
AT3G43240 0.000005 0.029638 0.028540 3 3.058183
AL3 0.000004 0.021954 0.016465 3 3.038423
REM22 0.000004 0.059276 0.024149 3 3.083428
RSZ22 0.000002 0.023052 0.021954 3 3.045008
GRP2 0.000002 0.030735 0.024149 3 3.054887
AT1G26300 0.000001 0.005488 0.004391 3 3.009880
AT1G26590 0.000001 0.016465 0.006586 3 3.023053
ARF9 0.000001 0.030735 0.025247 3 3.055984
CRF1 0.000001 0.106476 0.055982 3 3.162460

Search for individual genes¶

In [86]:
gene = 'SHR'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[86]:
end_degree_centrality end_out_centrality end_in_centrality end_closeness_centrality end_eigenvector_centrality per_degree_centrality per_out_centrality per_in_centrality per_closeness_centrality per_eigenvector_centrality pro_degree_centrality pro_out_centrality pro_in_centrality pro_closeness_centrality pro_eigenvector_centrality
SHR 0.01244 0.009569 0.002871 0.00029 0.010373 0.051095 0.029197 0.021898 0.000272 0.024423 0.088154 0.07438 0.013774 0.000501 0.029861
In [87]:
gene = 'BLJ'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[87]:
tf_occurance cor_degree_centrality cor_out_centrality cor_in_centrality cor_betweenness_centrality cor_closeness_centrality cor_eigenvector_centrality end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality per_degree_centrality per_out_centrality per_in_centrality per_betweenness_centrality per_closeness_centrality per_eigenvector_centrality
BLJ 3.0 0.159574 0.146277 0.013298 0.000028 0.000227 0.054619 0.948325 0.368421 0.579904 0.028025 0.000514 0.133685 0.136253 0.125304 0.010949 0.029873 0.000337 0.047573
In [88]:
gene = 'JKD'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[88]:
tf_occurance cor_degree_centrality cor_out_centrality cor_in_centrality cor_betweenness_centrality cor_closeness_centrality cor_eigenvector_centrality end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality per_degree_centrality per_out_centrality per_in_centrality per_closeness_centrality per_eigenvector_centrality
JKD 2.0 0.933511 0.582447 0.351064 0.005986 0.000289 0.123965 0.42488 0.205742 0.219139 0.004758 0.000507 0.091644 0.038929 0.037713 0.001217 0.000251 0.019211
In [89]:
gene = 'RVN'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[89]:
tf_occurance end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality
RVN 1.0 0.086124 0.055502 0.030622 0.000203 0.000437 0.041311
In [90]:
gene = 'BIB'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[90]:
tf_occurance end_degree_centrality end_out_centrality end_in_centrality end_betweenness_centrality end_closeness_centrality end_eigenvector_centrality
BIB 1.0 0.214354 0.120574 0.09378 0.003087 0.000483 0.066012
In [91]:
gene = 'IME'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[91]:
In [92]:
gene = 'MYB66'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[92]:
In [93]:
gene = 'GL2'
tf_spec[tf_spec.index==gene][tf_spec[tf_spec.index==gene].columns[tf_spec[tf_spec.index==gene].any()]]
Out[93]:
tf_occurance atri_degree_centrality atri_out_centrality atri_in_centrality atri_betweenness_centrality atri_closeness_centrality atri_eigenvector_centrality tri_degree_centrality tri_out_centrality tri_in_centrality tri_closeness_centrality tri_eigenvector_centrality lrc_degree_centrality lrc_out_centrality lrc_in_centrality lrc_closeness_centrality lrc_eigenvector_centrality
GL2 1.0 0.176623 0.111688 0.064935 0.527029 0.000514 0.069076 0.105556 0.103704 0.001852 0.000781 0.057388 0.079855 0.032668 0.047187 0.000745 0.036396
In [94]:
tf_spec.to_csv('TF_GRN_centrality_t5-t7_zscore3.csv', index=True)
In [ ]: